//
//  SetUpViewController.m
//  唧歪
//
//  Created by ZC on 15/7/9.
//  Copyright (c) 2015年 MWJ. All rights reserved.
//

#import "SetUpViewController.h"
#import "AboutViewController.h"  //关于app界面
#import "feedBackViewController.h"  //意见反馈界面
#import "SurveyViewController.h"  //意见调查界面
#import "WebViewController.h"


@interface SetUpViewController ()

@end

@implementation SetUpViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title=@"设置";
    
    self.LogoImage.layer.masksToBounds = YES;
    self.LogoImage.layer.cornerRadius = self.LogoImage.bounds.size.width/2;
    
    self.tableView.scrollEnabled = NO;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - 返回tableview的行数
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 2;
}

#pragma mark - 返回tableview的高度
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 50;
}
#pragma mark - cell的内容加载
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *cellIdentifier=@"cell";
    
    UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:cellIdentifier];
    
    NSArray *array = [[NSArray alloc] initWithObjects:@"关于APP",@"意见反馈", nil];
    NSArray *array1 = [NSArray arrayWithObjects:@"LOGO30.png", @"comment_edit.png", nil];
    
    if (cell==nil) {
        cell=[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
    }
    cell.imageView.image = [UIImage imageNamed:[NSString stringWithFormat:@"%@",array1[indexPath.row]]];
    cell.textLabel.text=array[indexPath.row];
    cell.textLabel.font=[UIFont fontWithName:@"arail" size:10];
    
    return cell;
}

#pragma mark - cell的点击事件
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    if (indexPath.row == 0) {
        WebViewController *webVC=[self.storyboard instantiateViewControllerWithIdentifier:@"WebVC"];
        [self.navigationController pushViewController:webVC animated:YES];
    }
//    if (indexPath.row == 1) {
//        UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"提示" message:@"目前已经是最新版本" delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
//        [alert show];
//    }
    if (indexPath.row == 1) {
        feedBackViewController *feedBack=[self.storyboard instantiateViewControllerWithIdentifier:@"feedBackVC"];
        [self.navigationController pushViewController:feedBack animated:YES];
    }
//    if (indexPath.row == 3) {
//        SurveyViewController *survey=[self.storyboard instantiateViewControllerWithIdentifier:@"surveyVC"];
//        [self.navigationController pushViewController:survey animated:YES];
//    }
    
}


@end
